﻿using System;
using Microsoft.Xna.Framework;

namespace TomAndJerryMidnightSnack
{
    public class MatrixLocation
    {
        //13x13
        public Vector2[][] mapLocations;
        public Vector2[] ListLocationDoorLeft;
        public Vector2[] ListLocationDoorRight;
        public enum DIRECTIONS { DOWN, UP, LEFT, RIGHT, FLY, FALL };
        public static MatrixLocation MatrixLocate;

        public MatrixLocation()
        {
            mapLocations= new Vector2[13][];
            mapLocations[0] = new Vector2[13];
            mapLocations[0][0] = Vector2.Zero;
            mapLocations[0][1] = Vector2.Zero;
            mapLocations[0][2] = Vector2.Zero;
            mapLocations[0][3] = Vector2.Zero;
            mapLocations[0][4] = Vector2.Zero;
            mapLocations[0][5] = Vector2.Zero;
            mapLocations[0][6] = new Vector2(176, 58);
            mapLocations[0][7] = Vector2.Zero;
            mapLocations[0][8] = Vector2.Zero;
            mapLocations[0][9] = Vector2.Zero;
            mapLocations[0][10] = Vector2.Zero;
            mapLocations[0][11] = Vector2.Zero;
            mapLocations[0][12] = Vector2.Zero;

            mapLocations[1] = new Vector2[13];
            mapLocations[1][0] = Vector2.Zero;
            mapLocations[1][1] = Vector2.Zero;
            mapLocations[1][2] = Vector2.Zero;
            mapLocations[1][3] = Vector2.Zero;
            mapLocations[1][4] = Vector2.Zero;
            mapLocations[1][5] = new Vector2(153, 113);
            mapLocations[1][6] = Vector2.Zero;
            mapLocations[1][7] = new Vector2(199, 113);
            mapLocations[1][8] = Vector2.Zero;
            mapLocations[1][9] = Vector2.Zero;
            mapLocations[1][10] = Vector2.Zero;
            mapLocations[1][11] = Vector2.Zero;
            mapLocations[1][12] = Vector2.Zero;

            mapLocations[2] = new Vector2[13];
            mapLocations[2][0] = Vector2.Zero;
            mapLocations[2][1] = Vector2.Zero;
            mapLocations[2][2] = Vector2.Zero;
            mapLocations[2][3] = Vector2.Zero;
            mapLocations[2][4] = new Vector2(132, 168);
            mapLocations[2][5] = Vector2.Zero;
            mapLocations[2][6] = new Vector2(176, 168);
            mapLocations[2][7] = Vector2.Zero;
            mapLocations[2][8] = new Vector2(221, 168);
            mapLocations[2][9] = Vector2.Zero;
            mapLocations[2][10] = Vector2.Zero;
            mapLocations[2][11] = Vector2.Zero;
            mapLocations[2][12] = Vector2.Zero;

            mapLocations[3] = new Vector2[13];
            mapLocations[3][0] = Vector2.Zero;
            mapLocations[3][1] = Vector2.Zero;
            mapLocations[3][2] = Vector2.Zero;
            mapLocations[3][3] = new Vector2(109, 223);
            mapLocations[3][4] = Vector2.Zero;
            mapLocations[3][5] = new Vector2(153, 223);
            mapLocations[3][6] = Vector2.Zero;
            mapLocations[3][7] = new Vector2(199, 223);
            mapLocations[3][8] = Vector2.Zero;
            mapLocations[3][9] = new Vector2(243, 223);
            mapLocations[3][10] = Vector2.Zero;
            mapLocations[3][11] = Vector2.Zero;
            mapLocations[3][12] = Vector2.Zero;

            mapLocations[4] = new Vector2[13];
            mapLocations[4][0] = Vector2.Zero;
            mapLocations[4][1] = Vector2.Zero;
            mapLocations[4][2] = new Vector2(86, 278);
            mapLocations[4][3] = Vector2.Zero;
            mapLocations[4][4] = new Vector2(132, 278);
            mapLocations[4][5] = Vector2.Zero;
            mapLocations[4][6] = new Vector2(176, 278);
            mapLocations[4][7] = Vector2.Zero;
            mapLocations[4][8] = new Vector2(221, 278);
            mapLocations[4][9] = Vector2.Zero;
            mapLocations[4][10] = new Vector2(266, 278);
            mapLocations[4][11] = Vector2.Zero;
            mapLocations[4][12] = Vector2.Zero;

            mapLocations[5] = new Vector2[13];
            mapLocations[5][0] = Vector2.Zero;
            mapLocations[5][1] = new Vector2(63, 333);
            mapLocations[5][2] = Vector2.Zero;
            mapLocations[5][3] = new Vector2(109, 333);
            mapLocations[5][4] = Vector2.Zero;
            mapLocations[5][5] = new Vector2(153, 333);
            mapLocations[5][6] = Vector2.Zero;
            mapLocations[5][7] = new Vector2(199, 333);
            mapLocations[5][8] = Vector2.Zero;
            mapLocations[5][9] = new Vector2(243, 333);
            mapLocations[5][10] = Vector2.Zero;
            mapLocations[5][11] = new Vector2(289, 333);
            mapLocations[5][12] = Vector2.Zero;

            mapLocations[6] = new Vector2[13];
            mapLocations[6][0] = new Vector2(41, 388);
            mapLocations[6][1] = Vector2.Zero;
            mapLocations[6][2] = new Vector2(86, 388);
            mapLocations[6][3] = Vector2.Zero;
            mapLocations[6][4] = new Vector2(132, 388);
            mapLocations[6][5] = Vector2.Zero;
            mapLocations[6][6] = new Vector2(176, 388);
            mapLocations[6][7] = Vector2.Zero;
            mapLocations[6][8] = new Vector2(221, 388);
            mapLocations[6][9] = Vector2.Zero;
            mapLocations[6][10] = new Vector2(266, 388);
            mapLocations[6][11] = Vector2.Zero;
            mapLocations[6][12] = new Vector2(311, 388);

            mapLocations[7] = new Vector2[13];
            mapLocations[7][0] = Vector2.Zero;
            mapLocations[7][1] = new Vector2(63, 443);
            mapLocations[7][2] = Vector2.Zero;
            mapLocations[7][3] = new Vector2(109, 443);
            mapLocations[7][4] = Vector2.Zero;
            mapLocations[7][5] = new Vector2(153, 443);
            mapLocations[7][6] = Vector2.Zero;
            mapLocations[7][7] = new Vector2(199, 443);
            mapLocations[7][8] = Vector2.Zero;
            mapLocations[7][9] = new Vector2(243, 443);
            mapLocations[7][10] = Vector2.Zero;
            mapLocations[7][11] = new Vector2(289, 443);
            mapLocations[7][12] = Vector2.Zero;

            mapLocations[8] = new Vector2[13];
            mapLocations[8][0] = Vector2.Zero;
            mapLocations[8][1] = Vector2.Zero;
            mapLocations[8][2] = new Vector2(86, 498);
            mapLocations[8][3] = Vector2.Zero;
            mapLocations[8][4] = new Vector2(132, 498);
            mapLocations[8][5] = Vector2.Zero;
            mapLocations[8][6] = new Vector2(176, 498);
            mapLocations[8][7] = Vector2.Zero;
            mapLocations[8][8] = new Vector2(221, 498);
            mapLocations[8][9] = Vector2.Zero;
            mapLocations[8][10] = new Vector2(266, 498);
            mapLocations[8][11] = Vector2.Zero;
            mapLocations[8][12] = Vector2.Zero;

            mapLocations[9] = new Vector2[13];
            mapLocations[9][0] = Vector2.Zero;
            mapLocations[9][1] = Vector2.Zero;
            mapLocations[9][2] = Vector2.Zero;
            mapLocations[9][3] = new Vector2(109, 553);
            mapLocations[9][4] = Vector2.Zero;
            mapLocations[9][5] = new Vector2(153, 553);
            mapLocations[9][6] = Vector2.Zero;
            mapLocations[9][7] = new Vector2(199, 553);
            mapLocations[9][8] = Vector2.Zero;
            mapLocations[9][9] = new Vector2(243, 553);
            mapLocations[9][10] = Vector2.Zero;
            mapLocations[9][11] = Vector2.Zero;
            mapLocations[9][12] = Vector2.Zero;

            mapLocations[10] = new Vector2[13];
            mapLocations[10][0] = Vector2.Zero;
            mapLocations[10][1] = Vector2.Zero;
            mapLocations[10][2] = Vector2.Zero;
            mapLocations[10][3] = Vector2.Zero;
            mapLocations[10][4] = new Vector2(132, 608);
            mapLocations[10][5] = Vector2.Zero;
            mapLocations[10][6] = new Vector2(176, 608);
            mapLocations[10][7] = Vector2.Zero;
            mapLocations[10][8] = new Vector2(221, 608);
            mapLocations[10][9] = Vector2.Zero;
            mapLocations[10][10] = Vector2.Zero;
            mapLocations[10][11] = Vector2.Zero;
            mapLocations[10][12] = Vector2.Zero;

            mapLocations[11] = new Vector2[13];
            mapLocations[11][0] = Vector2.Zero;
            mapLocations[11][1] = Vector2.Zero;
            mapLocations[11][2] = Vector2.Zero;
            mapLocations[11][3] = Vector2.Zero;
            mapLocations[11][4] = Vector2.Zero;
            mapLocations[11][5] = new Vector2(153, 663);
            mapLocations[11][6] = Vector2.Zero;
            mapLocations[11][7] = new Vector2(199, 663);
            mapLocations[11][8] = Vector2.Zero;
            mapLocations[11][9] = Vector2.Zero;
            mapLocations[11][10] = Vector2.Zero;
            mapLocations[11][11] = Vector2.Zero;
            mapLocations[11][12] = Vector2.Zero;

            mapLocations[12] = new Vector2[13];
            mapLocations[12][0] = Vector2.Zero;
            mapLocations[12][1] = Vector2.Zero;
            mapLocations[12][2] = Vector2.Zero;
            mapLocations[12][3] = Vector2.Zero;
            mapLocations[12][4] = Vector2.Zero;
            mapLocations[12][5] = Vector2.Zero;
            mapLocations[12][6] = new Vector2(176, 710);
            mapLocations[12][7] = Vector2.Zero;
            mapLocations[12][8] = Vector2.Zero;
            mapLocations[12][9] = Vector2.Zero;
            mapLocations[12][10] = Vector2.Zero;
            mapLocations[12][11] = Vector2.Zero;
            mapLocations[12][12] = Vector2.Zero;

            ListLocationDoorLeft = new Vector2[7];
            ListLocationDoorLeft[0] = new Vector2(170,180);
            ListLocationDoorLeft[1] = new Vector2(195, 240);
            ListLocationDoorLeft[2] = new Vector2(215,295);
            ListLocationDoorLeft[3] = new Vector2(240, 350);
            ListLocationDoorLeft[4] = new Vector2(265, 405);
            ListLocationDoorLeft[5] = new Vector2(285, 460);
            ListLocationDoorLeft[6] = new Vector2(305, 510);

            ListLocationDoorRight = new Vector2[7];
            ListLocationDoorRight[0] = new Vector2(170, 930);
            ListLocationDoorRight[1] = new Vector2(190, 870);
            ListLocationDoorRight[2] = new Vector2(215,820);
            ListLocationDoorRight[3] = new Vector2(240, 760);
            ListLocationDoorRight[4] = new Vector2(260, 705);
            ListLocationDoorRight[5] = new Vector2(285, 650);
            ListLocationDoorRight[6] = new Vector2(305, 600);
        }

        public static MatrixLocation getInstance()
        {
            if (MatrixLocate == null)
            {
                MatrixLocate = new MatrixLocation();
            }
            return MatrixLocate;
        }
    }
}

